package com.example.courseservice.service;

import com.example.courseservice.entity.*;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CourseService {
    // 课程基础操作
    @Transactional
    Course createCourse(Course course);
    
    Course updateCourse(String courseId, Course course);
    void deleteCourse(String courseId);
    Course getCourseById(String courseId);
    List<Course> getAllCourses();

    // 课程内容管理
    void addMaterial(String courseId, String chapterId, Material material);
    void deleteMaterial(String courseId, String chapterId, String materialId);
    void addChapter(String courseId, Chapter chapter);
    void deleteChapter(String courseId, String chapterId);
    List<Chapter> getChapters(String courseId);
}